<style>
  .layout {
    background: #f5f7f9;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
  }

  .demo-spin-icon-load {
    animation: ani-demo-spin 1s linear infinite;
  }

  .demo-spin-col {
    height: 100px;
    position: relative;
  }

  .mb20 {
    margin-bottom: 20px;
  }

  .layout-logo {
    width: 110px;
    height: 30px;
    background: #5b6270;
    border-radius: 3px;
    float: left;
    position: relative;
    top: 15px;
    left: 20px;
  }

  .layout-nav {
    width: 420px;
    margin: 0 auto;
    margin-right: 20px;
  }

  .layout-footer-center {
    text-align: center;
  }

  .content {
    height: auto;
    background-color: white;
    padding-left: 30px;
    padding-right: 30px;
  }

  .items {
    height: 40px;
    line-height: 40px
  }

  .info {
    height: auto;
    background-color: #F8F8FF;
    padding-left: 70px;
    padding-right: 70px;
  }

  .header {
    height: 40px;
    background-color: white;
    line-height: 40px;
    border-bottom: 1px solid orangered;
  }

  .info-middle {
    height: 330px;
    background-color: #F8F8FF;
    padding-left: 70px;
    padding-right: 70px;
    padding-bottom: 15px;
  }

  .titles {
    height: 35px;
    background-color: black;
    line-height: 35px;
    font-size: 1rem;
    color: white;
    padding-left: 10px;
  }

  .nopadding .ivu-table-cell {
    padding: 0px 0px;
  }

  .head_btn {
    height: 45px;
    line-height: 45px;
    width: 130px;
    float: left;
    margin-right: 20px;
  }

  .subsidy-img {
    height: 140px;
    width: 120px;
    position: absolute;
    right: 8%;
    top: 11%;
  }
</style>
<template>
  <Layout>
    <div class="layout">
      <div class="titles">办件信息</div>
      <div class="head_btn" v-if="formItem.operation=='1'">
        <Button type="primary" style="margin-right:10px" long @click="saveOrder">保 存</Button>
      </div>
      <div class="head_btn" v-for="(button, btn_key) in formItem.buttons_list" v-bind:key="btn_key">
        <Button type="primary" style="margin-right:10px" long @click="handlerItem(button, btn_key)">{{button.name}}
        </Button>
      </div>
      <div class="head_btn">
        <Button type="error" style="margin-right:10px" long @click="backOrder">返 回</Button>
      </div>
    </div>
    <Content class="content">
      <div class="header">
        <span style="font-size: 20px;color: coral;">01 事项信息</span>
      </div>
      <div class="info">
        <div class="items">
          <div style="width:100%;float:left">
            <span>事项名称：</span><span>{{itemData.text}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:100%;float:left">
            <span>事项编码：</span><span>{{itemData.id}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:100%;float:left">
            <span>联系电话: </span><span>{{itemData.LINK_TEL}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:40%;float:left">
            <span>所属部门：</span><span>{{itemData.jdjg}}</span>
          </div>
          <div style="width:30%;;float:left">
            <span>是否收费：</span><span>{{itemData.CHARGE_FLAG=='0'?'不收费':'收费'}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:40%;float:left">
            <span>承诺期限：</span><span>{{itemData.PROMISE_DAY}}天</span>
          </div>
          <div style="width:60%;float:left">
            <span>办理时间：</span><span>{{itemData.ACCEPT_TIME}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:80%;float:left">
            <span>受理条件：</span><span>{{itemData.APPLY_CONDITION}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:100%;float:left">
            <span>补充说明：</span><span>{{itemData.SXSM}}</span>
          </div>
        </div>
        <div style="clear:both;height:1px;width:100%; overflow:hidden; margin-top:-1px;"></div>
      </div>
      <div class="header">
        <span style="font-size: 20px;color: coral;">02 办件信息</span>
      </div>
      <div class="info-middle">
        <div style="width:50%;float:left">
          <Form ref="personinfo" :model="personinfo" :label-width="110" style="margin-top:10px">
            <FormItem label="申请人类型: ">
              <RadioGroup v-model="formItem.radio">
                <Radio label="male">个人</Radio>
              </RadioGroup>
            </FormItem>
            <FormItem label="证件类型: " prop="type">
              <Input v-model="personinfo.type" disabled="disabled"></Input>
            </FormItem>
            <FormItem label="证件编号: " prop="code">
              <Input v-model="personinfo.cardno" disabled="disabled"></Input>
            </FormItem>
            <FormItem label="民族: ">
              <Input v-model="personinfo.folk" disabled="disabled"> </Input>
            </FormItem>
            <FormItem label="地址: ">
              <Input type="textarea" v-model="personinfo.address" :autosize="{minRows: 2,maxRows: 5}"
                     disabled="disabled"></Input>
            </FormItem>
          </Form>
        </div>
        <div style="width:50%;float:left">
          <Form ref="personinfo" :model="personinfo" :label-width="100" style="margin-top:10px">
            <FormItem label="申请人: " prop="name">
              <Input v-model="personinfo.name" disabled="disabled"></Input>
            </FormItem>
            <FormItem label="联系电话: ">
              <Input v-model="personinfo.mobile" disabled="disabled"></Input>
            </FormItem>
            <FormItem label="性别: ">
              <Input v-model="personinfo.sex" disabled="disabled"></Input>
            </FormItem>
            <FormItem label="生日: ">
              <Input v-model="personinfo.birthday" disabled="disabled"> </Input>
            </FormItem>
            <FormItem label="政治面貌: ">
              <Input v-model="personinfo.political_outlook" disabled="disabled"></Input>
            </FormItem>
          </Form>
        </div>
      </div>
      <div class="header">
        <span style="font-size: 20px;color: coral;">03 申报材料</span>
      </div>
      <div style="height: auto; background-color: #F8F8FF;">
        <Table v-if="!formItem.reloadTabel" border :columns="columns7" :data="documentlist"></Table>
      </div>
    </Content>
    <Modal v-model="formItem.fun_modal.show" width="600" :title="formItem.fun_modal.title" @on-ok="acceptBtn">
      <Form label-position="right" :label-width="100">
        <Row>
          <Col span="5" class="ivu-form-item-label">{{formItem.fun_modal.params_name}}：</Col>
          <Col span="16" class="ivu-form-item-content">
            <Input v-if="formItem.fun_modal.params_type == 'textarea'" v-model="formItem.fun_modal.text"
                   type="textarea" :autosize="{minRows: 3,maxRows: 7}"></Input>
          </Col>
        </Row>
      </Form>
    </Modal>

    <Modal v-model="face_mol" title="拍照" @on-visible-change="modalChange" width="700">
      <face-camera :isPlay="face_shows" @img-result="imgResult"></face-camera>
      <div slot="footer">
        <Button type="error" size="large" long :loading="face_loading" @click="face_mol = false">关闭</Button>
      </div>
    </Modal>
    <Modal v-model="gpy_mol" title="高拍仪" @on-visible-change="modalChange2" @on-cancel="closeHeight"
           @on-ok="closeHeight">
      <height-camera :isOpen="gpy_shows" @ret-fun="retFun"></height-camera>
    </Modal>
    <Modal v-model="up_pic_mol" title="图片上传" @on-ok="changeToView" :closable="false">
      <Upload multiple action="//txy.juyouhx.com/Api/Api/ObjectToOss/" :on-success="uploadPicSuccess">
        <Button icon="ios-cloud-upload-outline">上传</Button>
        <span style="margin-left: 250px">请上传小于2M的图片</span>
      </Upload>
      <img :src="temp_photo" style="width: 100%"/>
    </Modal>
    <Modal v-model="pic_preview_mol" :closable="false" :styles="{top: '20px'}">
      <img :src="temp_photo" style="width: 100%"/>
      <div slot="footer">
        <Button type="error" size="large" long @click="pic_preview_mol=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障变更表单模态框-->
    <Modal v-model="formItem.itemChangeFormShow" :title="formItem.itemChangeFormTitle"
           width="1000" :closable="false" @on-ok="saveChangeInfo" cancel-text="">
      <Form1 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
             :ruleData="ruleData"  :monthListaa="monthList" @ee="saveStopInfo()">
      </Form1>
      <div slot="footer">
        <Button type="success" @click="saveChangeInfo()">确定</Button>
        <Button type="error" @click="formItem.itemChangeFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障申请表单模态框-->
    <Modal v-model="formItem.itemApplyFormShow" :title="formItem.itemApplyFormTitle"
           width="1000" :closable="false">
      <Form2 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
             :ruleData="ruleData"  :tempData="tempData" @ee="saveStopInfo()">
      </Form2>
      <div slot="footer">
        <Button type="success" @click="saveApplyInfo()">确定</Button>
        <Button type="error" @click="formItem.itemApplyFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障申请(农业转移人口)表单模态框-->
    <Modal v-model="formItem.itemApplicationAgriculturalShow" :title="formItem.itemApplicationAgriculturalFormTitle"
           width="1000" :closable="false">
      <Form2_1 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
               :ruleData="ruleData" :tempData="tempData" @ee="saveStopInfo()">
      </Form2_1>
      <div slot="footer">
        <Button type="success" @click="saveApplyInfo()">确定</Button>
        <Button type="error" @click="formItem.itemApplicationAgriculturalShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障资格终止表单模态框-->
    <Modal v-model="formItem.itemStopFormShow" :title="formItem.itemStopFormTitle"
           width="1000" :closable="false">
      <Form3 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
             :ruleData="ruleData" @ee="saveStopInfo()" :monthListaa="monthList">
      </Form3>
      <div slot="footer">
        <!--<Button type="success" @click="saveStopInfo()">确定</Button>-->
        <Button type="error" @click="formItem.itemStopFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障补贴年审表单模态框-->
    <Modal v-model="formItem.itemReviewFormShow" :title="formItem.itemReviewFormTitle"
           width="1000" :closable="false">
      <Form4 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
             :ruleData="ruleData" @ee="saveStopInfo()" :monthListaa="monthList" >
      </Form4>
      <div slot="footer">
        <Button type="success" @click="saveReviewInfo()">确定</Button>
        <Button type="error" @click="formItem.itemReviewFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁实物配租复核表单模态框-->
    <Modal v-model="formItem.itemCheckFormShow" :title="formItem.itemCheckFormTitle"
           width="1000" :closable="false">
      <Form5 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo()">
      </Form5>
      <div slot="footer">
        <Button type="success" @click="saveCheckInfo()">确定</Button>
        <Button type="error" @click="formItem.itemCheckFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租户籍区域转移表单模态框-->
    <Modal v-model="formItem.itemTransferFormShow" :title="formItem.itemTransferFormTitle"
           width="1000" :closable="false">
      <Form6 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo()">
      </Form6>
      <div slot="footer">
        <Button type="success" @click="saveTransferInfo()">确定</Button>
        <Button type="error" @click="formItem.itemTransferFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障录入租赁证表单模态框-->
    <Modal v-model="formItem.itemRegisterFormShow" :title="formItem.itemRegisterFormTitle"
           width="1000" :closable="false">
      <Form7 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo()">
      </Form7>
      <div slot="footer">
        <Button type="success" @click="saveRegisterInfo()">确定</Button>
        <Button type="error" @click="formItem.itemRegisterFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房摇号登记表单模态框-->
    <Modal v-model="formItem.itemBatchFormShow" :title="formItem.itemBatchFormTitle"
           width="1000" :closable="false">
      <Form8 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo()">
      </Form8>
      <div slot="footer">
        <Button type="success" @click="saveBatchInfo()">确定</Button>
        <Button type="error" @click="formItem.itemBatchFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低保及低保边缘家庭(住房)情况基础信息表单模态框-->
    <Modal v-model="formItem.itemSubsidyApplicationFormShow" :title="formItem.itemSubsidyApplicationFormTitle"
           width="1000" :closable="false">
      <Form9 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
             :ruleData="ruleData" :tempData="tempData" @ee="saveStopInfo()">
      </Form9>
      <div slot="footer">
        <Button type="success" @click="saveSubsidyApplicationInfo()">确定</Button>
        <Button type="error" @click="formItem.itemSubsidyApplicationFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低保及低保边缘家庭基本信息表单模态框-->
    <Modal v-model="formItem.itemBasicFamilyInfoFormShow" :title="formItem.itemBasicFamilyInfoFormTitle"
           width="1200" :closable="false">
      <Form9_1 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
               :ruleData="ruleData" :tempData="tempData" @ee="saveStopInfo()">
      </Form9_1>
      <div slot="footer">
        <Button type="success" @click="saveBasicFamilyInfo()">确定</Button>
        <Button type="error" @click="formItem.itemBasicFamilyInfoFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低保及低保边缘家庭特殊情况表单模态框-->
    <Modal v-model="formItem.itemExceptionalCaseFormShow" :title="formItem.itemExceptionalCaseFormTitle"
           width="1000" :closable="false">
      <Form9_2 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
               :ruleData="ruleData" :tempData="tempData" @ee="saveStopInfo()">
      </Form9_2>
      <div slot="footer">
        <Button type="success" @click="saveExceptionalCaseInfo()">确定</Button>
        <Button type="error" @click="formItem.itemExceptionalCaseFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低保及低保边缘家庭保障情况表单模态框-->
    <Modal v-model="formItem.itemSecuritySituationFormShow" :title="formItem.itemSecuritySituationFormTitle"
           width="1000" :closable="false">
      <Form9_3 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo()">
      </Form9_3>
      <div slot="footer">
        <Button type="success" @click="saveSecuritySituationInfo()">确定</Button>
        <Button type="error" @click="formItem.itemSecuritySituationFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低保及低保边缘家庭住房情况表单模态框-->
    <Modal v-model="formItem.itemHousingSituationFormShow" :title="formItem.itemHousingSituationFormTitle"
           width="1200" :closable="false">
      <Form9_4 label-position="right" :label-width="100" style="position: relative;height: 1200px"
               :formDate="formItem.itemInfoForm" :ruleData="ruleData" :tempData="tempData" @ee="saveStopInfo()">
      </Form9_4>
      <div slot="footer">
        <Button type="success" @click="saveHousingSituationInfo()">确定</Button>
        <Button type="error" @click="formItem.itemHousingSituationFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭（廉租住房）实物配租申请(5个)-->
    <Modal v-model="formItem.itemApplicationLeasingFormShow" :title="formItem.itemApplicationLeasingFormTitle"
           width="1200" :closable="false">
      <Form10 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo()">
      </Form10>
      <div slot="footer">
        <Button type="success" @click="saveApplicationLeasingInfo()">确定</Button>
        <Button type="error" @click="formItem.itemApplicationLeasingFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭（廉租住房）租金核减(5个)-->
    <!--低收入住房困难家庭（廉租住房）租赁补贴年审-->
    <!--低收入住房困难家庭（廉租住房）实物配租年审-->
    <Modal v-model="formItem.itemAnnualReviewFormShow" :title="formItem.itemAnnualReviewFormTitle"
           width="1000" :closable="false">
      <Form14 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo()">
      </Form14>
      <div slot="footer">
        <Button type="success" @click="saveAnnualReviewInfo()">确定</Button>
        <Button type="error" @click="formItem.itemAnnualReviewFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭（廉租住房）住房保障变更-->
    <Modal v-model="formItem.itemHousingSecurityChangeFormShow" :title="formItem.itemHousingSecurityChangeFormTitle"
           width="1000" :closable="false">
      <Form11 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo()">
      </Form11>
      <div slot="footer">
        <Button type="success" @click="saveHousingSecurityChangeInfo()">确定</Button>
        <Button type="error" @click="formItem.itemHousingSecurityChangeFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭（廉租住房）住房保障资格终止-->
    <Modal v-model="formItem.itemTerminationOfEligibilityFormShow"
           :title="formItem.itemTerminationOfEligibilityFormTitle"
           width="1000" :closable="false">
      <Form12 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo()">
      </Form12>
      <div slot="footer">
        <Button type="success" @click="saveTerminationOfEligibilityInfo()">确定</Button>
        <Button type="error" @click="formItem.itemTerminationOfEligibilityFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭（廉租住房）住房保障户籍转移-->
    <Modal v-model="formItem.itemRegionalTransferFormShow" :title="formItem.itemRegionalTransferFormTitle"
           width="1000" :closable="false">
      <Form13 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo()">
      </Form13>
      <div slot="footer">
        <Button type="success" @click="saveRegionalTransferInfo()">确定</Button>
        <Button type="error" @click="formItem.itemRegionalTransferFormShow=false">关闭</Button>
      </div>
    </Modal>
  </Layout>
</template>
<script>
import FaceCamera from '_c/face2-camera'
import HeightCamera from '_c/height2-camera'
import WlForm from '_c/wl-form'
// import formdata from '@/mock/data/form-data.js'
import { userinfo, iteminf, createOrder, setorderapply, updateOrder, date2str, communityInfo } from '@/api/eventlist'
import { ensureApply } from '@/api/houseproperty'
import nophoto from '@/assets/images/nophoto.jpeg'
import SplitPane from '@/components/split-pane/split'
import Form1 from './components/form-other1/index'
import Form2 from './components/form-other2/index'
import Form2_1 from './components/form-other2-1/index'
import Form3 from './components/form-other3/index'
import Form4 from './components/form-other4/index'
import Form5 from './components/form-other5/index'
import Form6 from './components/form-other6/index'
import Form7 from './components/form-other7/index'
import Form8 from './components/form-other8/index'
import Form9 from './components/form-other9/index'
import Form9_1 from './components/form-other9-1/index'
import Form9_2 from './components/form-other9-2/index'
import Form9_3 from './components/form-other9-3/index'
import Form9_4 from './components/form-other9-4/index'
import Form10 from './components/form-other10/index'
import Form11 from './components/form-other11/index'
import Form12 from './components/form-other12/index'
import Form13 from './components/form-other13/index'
import Form14 from './components/form-other14/index'
import Modal1 from './components/modal-other1/index'

export default {
  data () {
    return {
      communityData: {},
      // formdata111: {},
      monthList: [],
      tempData: {},
      ruleData: {},
      personTypeList: [],
      interface_code: this.$route.params.interface_code,
      // 事项详细信息(01 事项信息)
      itemData: {},
      // 办理人员信息(02 办件信息)
      personinfo: {},
      // 申报材料列表(03 申报材料)
      documentlist: [],
      // 图片要件预览临时变量
      temp_photo: '',
      // 拍照弹出框控制器
      face_mol: false,
      // 控制打开or关闭拍照功能
      face_shows: false,
      // 高拍仪弹出框控制器
      gpy_mol: false,
      // 控制打开or关闭高拍仪功能
      gpy_shows: false,
      up_pic_mol: false,
      // 图片要件预览弹出框控制器
      pic_preview_mol: false,
      face_loading: false,
      nophoto,
      // 页面内其他的功能变量
      formItem: {
        // 跳入当前页面时，需要的操作，1添加或编辑 2查看 3审核
        operation: '',
        // 上个页面带过来的按钮，目前只有审核有按钮
        buttons_list: {},
        // 上个页面带的按钮，功能能模态框
        fun_modal: { show: false },
        a: '低保残疾人',
        b: '生活补贴',
        reloadTabel: false,
        // 在点击申报材料后面按钮时，记录当前要件在列表的索引位置
        paramIndex: 0,
        radio: 'male',
        itemInfoFormShow: false,
        itemSubsidyFormShow: false,
        itemDeathFormShow: false,
        itemChangeFormShow: false, // 公租房变更
        itemApplyFormShow: false, // 公租房申请
        itemApplicationAgriculturalShow: false, // 公租房申请-农业转移人口
        itemStopFormShow: false, // 公租房保障资格终止
        itemReviewFormShow: false, // 公租房保障补贴年审
        itemCheckFormShow: false, // 公租房实物配租复核
        itemTransferFormShow: false, // 公租房户籍区域转移
        itemRegisterFormShow: false, // 公共租赁住房保障录入租赁证
        itemBatchFormShow: false, // 公租房摇号申请登记
        itemSubsidyApplicationFormShow: false, // 廉租住房）租赁补贴申请
        itemBasicFamilyInfoFormShow: false, // 低保及低保边缘家庭基本信息
        itemExceptionalCaseFormShow: false, // 低保及低保边缘家庭特殊情况
        itemSecuritySituationFormShow: false, // 低保及低保边缘家庭保障情况
        itemHousingSituationFormShow: false, // 低保及低保边缘家庭住房情况
        itemApplicationLeasingFormShow: false, // 低收入住房困难家庭（廉租住房）实物配租申请
        itemHousingSecurityChangeFormShow: false, // 低收入住房困难家庭（廉租住房）住房保障变更
        itemTerminationOfEligibilityFormShow: false, // 低收入住房困难家庭（廉租住房）住房保障资格终止
        itemRegionalTransferFormShow: false, // 低收入住房困难家庭（廉租住房）住房户籍区域转移
        itemAnnualReviewFormShow: false, // 低收入住房困难家庭（廉租住房）实物配租年审
        itemInfoFormTitle: '',
        itemSubsidyFormTitle: '',
        itemDeathFormTitle: '',
        itemChangeFormTitle: '',
        itemApplyFormTitle: '',
        itemApplicationAgriculturalFormTitle: '',
        itemStopFormTitle: '',
        itemReviewFormTitle: '',
        itemCheckFormTitle: '',
        itemTransferFormTitle: '',
        itemRegisterFormTitle: '',
        itemBatchFormTitle: '',
        itemSubsidyApplicationFormTitle: '',
        itemBasicFamilyInfoFormTitle: '',
        itemExceptionalCaseFormTitle: '',
        itemSecuritySituationFormTitle: '',
        itemHousingSituationFormTitle: '',
        itemApplicationLeasingFormTitle: '',
        itemHousingSecurityChangeFormTitle: '',
        itemTerminationOfEligibilityFormTitle: '',
        itemRegionalTransferFormTitle: '',
        itemAnnualReviewFormTitle: '',
        itemInfoForm: {},
        dict: {
          't_file': '文件要件',
          't_form': '信息表单',
          'wt_images': '图片',
          'wt_form': '表单'
        }
      },
      personList: [
        {
          bz_relation: 0,
          bz_name: '0',
          bz_idcard: '21',
          bz_companyName: '0',
          bz_kzpnsr: '0',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        }
      ],
      houseList: [
        {
          holder: '',
          address: '',
          buildArea: '',
          ownerType: ''
        },
        {
          holder: '',
          address: '',
          buildArea: '',
          ownerType: ''
        },
        {
          holder: '',
          address: '',
          buildArea: '',
          ownerType: ''
        },
        {
          holder: '',
          address: '',
          buildArea: '',
          ownerType: ''
        }
      ],
      personList1: [
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        }
      ],
      personList2: [
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        }

      ],
      houseList2: [
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: ''
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: ''
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: ''
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: ''
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: ''
        }
      ],
      // 申报材料表头
      columns7: [
        { title: '序号', type: 'index', width: 70, align: 'center' },
        { title: '材料名称', key: 'name', width: 170 },
        { title: '材料类型', key: 'type_name', width: 100 },
        { title: '文件类型', key: 'write_type_name', width: 90 },
        { title: '是否提交', key: 'is_submit', width: 90 },
        { title: '备注', key: 'remark', width: 260 },
        {
          title: '操作',
          key: 'action',
          align: 'center',
          className: 'nopadding',
          render: (h, params) => {
            let temp = []
            if (params.row.write_type === 'images') {
              if (this.formItem.operation === '1') {
                temp.push(
                  h('Button', {
                    props: { type: 'primary', size: 'small' },
                    style: { marginRight: '5px' },
                    on: {
                      click: () => {
                        this.gpy_mol = true
                        this.gpy_shows = true
                        this.formItem.paramIndex = params.index
                      }
                    }
                  }, '高拍仪')
                )
                temp.push(
                  h('Button', {
                    props: { type: 'primary', size: 'small' },
                    style: { marginRight: '5px' },
                    on: {
                      click: () => {
                        this.up_pic_mol = true
                        this.temp_photo = params.row.img_url
                        this.formItem.paramIndex = params.index
                      }
                    }
                  }, '上传')
                )
                temp.push(
                  h('Button', {
                    props: { type: 'primary', size: 'small' },
                    style: { marginRight: '5px' },
                    on: {
                      click: () => {
                        this.face_mol = true
                        this.face_shows = true
                        this.formItem.paramIndex = params.index
                      }
                    }
                  }, '拍照')
                )
              }
              if (params.row.is_submit === '已提交') {
                temp.push(
                  h('Button', {
                    props: { type: 'info', size: 'small' },
                    style: { marginRight: '5px' },
                    on: {
                      click: () => {
                        this.temp_photo = params.row.img_url
                        this.pic_preview_mol = true
                      }
                    }
                  }, this.formItem.operation !== '1' ? '查看' : '预览')
                )
              }
            } else if (params.row.write_type === 'form') {
              temp.push(
                h('Button', {
                  props: { type: 'info', size: 'small' },
                  style: { marginRight: '5px' },
                  on: {
                    click: () => {
                      console.log(params.row.form_path, 'params.row.form_pathparams.row.form_path')
                      this.formItem.paramIndex = params.index
                      this.popApplicationAgriculturalForm(params.row)
                      // this.formItem[params.row.form_path] = true
                    }
                  }
                }, this.formItem.operation !== '1' ? '查看' : '编辑')
              )
            }
            return h('div', temp)
          }
        }
      ]
    }
  },
  components: {
    SplitPane,
    FaceCamera,
    HeightCamera,
    WlForm,
    Form1,
    Form2,
    Form2_1,
    Form3,
    Form4,
    Form5,
    Form6,
    Form7,
    Form8,
    Form9,
    Form9_1,
    Form9_2,
    Form9_3,
    Form9_4,
    Form10,
    Form11,
    Form12,
    Form13,
    Form14,
    Modal1
  },
  methods: {
    commInfo () {
      let a = {}
      communityInfo(a).then(res => {
        console.log(res.data.data, '9999999')
        console.log(res.data.data.jiedao_code, '888888888')
        this.communityData = res.data.data
      })
    },

    modalChange (e) {
      this.face_shows = e
    },
    modalChange2 (e) {
      this.openNow = e
    },
    // 页面内提交材料发生变化时刷新表格数据动态
    changeToView () {
      this.formItem.reloadTabel = true
      let temp = this.documentlist[this.formItem.paramIndex]
      if (temp.img_url || temp.write_type === 'form') {
        temp.is_submit = '已提交'
      }
      this.$nextTick(() => {
        this.formItem.reloadTabel = false
      })
    },
    // 社区证明事项的表单信息校验
    saveJzInfo (flag) {
      if (!this.formItem.itemInfoForm.holder) {
        this.$Notice.error({ title: '请填写持证者', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.xb) {
        this.$Notice.error({ title: '请填写性别', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.holder_code) {
        this.$Notice.error({ title: '请填写证件号码', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.sxzm) {
        this.$Notice.error({ title: '请填写所需证明', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.xzz) {
        this.$Notice.error({ title: '请填写现住址', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.qtqk) {
        this.$Notice.error({ title: '请填写其他情况', desc: '' })
        return false
      }
      if (flag) {
        this.documentlist[this.formItem.paramIndex].formdata = this.formItem.itemInfoForm
      }
      this.formItem.itemInfoFormShow = false
      this.changeToView()
      return true
    },
    // 公共租赁住房保障变更表单信息校验
    saveChangeInfo () {
      console.log('保存公共租赁住房保障变更')
      console.log(this.formItem.itemInfoForm, '表单数据')
      if (!this.formItem.itemInfoForm.committeeChangeReason) {
        this.$Notice.error({ title: '请填写变更原因说明', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.committeeChangeHandler) {
        this.$Notice.error({ title: '请填写社区变更操作人', desc: '' })
        return false
      }
      this.changeToView()
    },
    // 公共租赁住房保障变更表单信息校验
    saveApplyInfo () {
      console.log('保存公共租赁住房申请')
      console.log(this.formItem.itemInfoForm, '表单数据')
      console.log(this.personList)
      // if (!this.formItem.itemInfoForm.committeeChangeReason) {
      //  this.$Notice.error({ title: '请填写变更原因说明', desc: '' })
      //  return false
      // }
      // if (!this.formItem.itemInfoForm.committeeChangeHandler) {
      //  this.$Notice.error({ title: '请填写社区变更操作人', desc: '' })
      //  return false
      // }
      this.changeToView()
    },
    // 公共租赁住房保障变更表单信息校验
    // 公共租赁住房保障资格终止表单信息校验
    saveStopInfo () {
      //  console.log('保存公共租赁保障资格终止')
      // console.log(this.formItem.itemInfoForm, '表单数据')
      // if (!this.formItem.itemInfoForm.overReasonMemo) {
      //   this.$Notice.error({ title: '请填写变更原因说明', desc: '' })
      //   return false
      // }
      // if (!this.formItem.itemInfoForm.stopActionPerson) {
      //   this.$Notice.error({ title: '请填写社区变更操作人', desc: '' })
      //   return false
      // }
      // if (!this.formItem.itemInfoForm.committeePrincipal) {
      //   this.$Notice.error({ title: '请填写社区负责人', desc: '' })
      //   return false
      // }
    /*  this.formItem.itemStopFormShow = false
      this.formItem.itemChangeFormShow = false */
      this.formItem.itemInfoFormShow = false
      this.formItem.itemSubsidyFormShow = false
      this.formItem.itemDeathFormShow = false
      this.formItem.itemChangeFormShow = false // 公租房变更
      this.formItem.itemApplyFormShow = false // 公租房申请
      this.formItem.itemApplicationAgriculturalShow = false // 公租房申请-农业转移人口
      this.formItem.itemStopFormShow = false // 公租房保障资格终止
      this.formItem.itemReviewFormShow = false // 公租房保障补贴年审
      this.formItem.itemCheckFormShow = false // 公租房实物配租复核
      this.formItem.itemTransferFormShow = false // 公租房户籍区域转移
      this.formItem.itemRegisterFormShow = false // 公共租赁住房保障录入租赁证
      this.formItem.itemBatchFormShow = false // 公租房摇号申请登记
      this.formItem.itemSubsidyApplicationFormShow = false// 廉租住房）租赁补贴申请
      this.formItem.itemBasicFamilyInfoFormShow = false // 低保及低保边缘家庭基本信息
      this.formItem.itemExceptionalCaseFormShow = false// 低保及低保边缘家庭特殊情况
      this.formItem.itemSecuritySituationFormShow = false // 低保及低保边缘家庭保障情况
      this.formItem.itemHousingSituationFormShow = false // 低保及低保边缘家庭住房情况
      this.formItem.itemApplicationLeasingFormShow = false // 低收入住房困难家庭（廉租住房）实物配租申请
      this.formItem.itemHousingSecurityChangeFormShow = false // 低收入住房困难家庭（廉租住房）住房保障变更
      this.formItem.itemTerminationOfEligibilityFormShow = false // 低收入住房困难家庭（廉租住房）住房保障资格终止
      this.formItem.itemRegionalTransferFormShow = false // 低收入住房困难家庭（廉租住房）住房户籍区域转移
      this.formItem.itemAnnualReviewFormShow = false // 低收入住房困难家庭（廉租住房）实物配租年审

      this.changeToView()
    },
    // 公共租赁住房保障补贴年审表单信息校验
    saveReviewInfo () {
      console.log('保存公共租赁保障资格终止')
      console.log(this.formItem.itemInfoForm, '表单数据')
      if (!this.formItem.itemInfoForm.committeeChangeReason) {
        this.$Notice.error({ title: '请填写变更原因说明', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.committeeChangeHandler) {
        this.$Notice.error({ title: '请填写社区变更操作人', desc: '' })
        return false
      }
      this.changeToView()
    },
    // 公共租赁住房实物配租复核
    saveCheckInfo () {
      console.log('保存公共租赁保障资格终止')
      console.log(this.formItem.itemInfoForm, '表单数据')
      if (!this.formItem.itemInfoForm.committeeChangeReason) {
        this.$Notice.error({ title: '请填写变更原因说明', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.committeeChangeHandler) {
        this.$Notice.error({ title: '请填写社区变更操作人', desc: '' })
        return false
      }
      this.changeToView()
    },
    // 公共租赁住房户籍区域转移
    saveTransferInfo () {
      console.log('保存公共租赁保障资格终止')
      console.log(this.formItem.itemInfoForm, '表单数据')
      if (!this.formItem.itemInfoForm.committeeChangeReason) {
        this.$Notice.error({ title: '请填写变更原因说明', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.committeeChangeHandler) {
        this.$Notice.error({ title: '请填写社区变更操作人', desc: '' })
        return false
      }
      this.changeToView()
    },
    // 公共租赁住房保障录入租赁证
    saveRegisterInfo () {
      console.log('保存公共租赁住房保障录入租赁证')
      console.log(this.formItem.itemInfoForm, '表单数据')
      if (!this.formItem.itemInfoForm.committeeChangeReason) {
        this.$Notice.error({ title: '请填写变更原因说明', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.committeeChangeHandler) {
        this.$Notice.error({ title: '请填写社区变更操作人', desc: '' })
        return false
      }
      this.changeToView()
    },
    // （廉租住房）租赁补贴申请表格信息
    saveSubsidyApplicationInfo () {
      console.log('保存廉租住房）租赁补贴申请')
      console.log(this.formItem.itemInfoForm, '表单数据')
      if (!this.formItem.itemInfoForm.committeeChangeReason) {
        this.$Notice.error({ title: '请填写变更原因说明', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.committeeChangeHandler) {
        this.$Notice.error({ title: '请填写社区变更操作人', desc: '' })
        return false
      }
      this.changeToView()
    },
    // （廉租住房）低保家庭基本信息
    saveBasicFamilyInfo () {
      console.log('保存廉租住房）低保家庭基本信息')
      console.log(this.formItem.itemInfoForm, '表单数据')
      if (!this.formItem.itemInfoForm.committeeChangeReason) {
        this.$Notice.error({ title: '请填写变更原因说明', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.committeeChangeHandler) {
        this.$Notice.error({ title: '请填写社区变更操作人', desc: '' })
        return false
      }
      this.changeToView()
    },
    // 廉租住房）低保家庭特殊情况
    saveExceptionalCaseInfo () {
      this.changeToView()
    },
    // 保障情况
    saveSecuritySituationInfo () {
      this.changeToView()
    },
    // 住房情况
    saveHousingSituationInfo () {
      this.changeToView()
    },
    // 廉住房实物配租申请
    saveApplicationLeasingInfo () {
      this.changeToView()
    },
    // l廉租房保障变更
    saveHousingSecurityChangeInfo () {
      this.changeToView()
    },
    // 保障资格终止
    saveTerminationOfEligibilityInfo () {
      this.changeToView()
    },
    // 户籍转移
    saveRegionalTransferInfo () {
      this.changeToView()
    },
    // 廉租房实物配租年审
    saveAnnualReviewInfo () {
      this.changeToView()
    },
    // 公共租赁住房摇号登记
    saveBatchInfo () {
      console.log('保存公共租赁住房公共租赁住房摇号登记')
      console.log(this.formItem.itemInfoForm, '表单数据')
      if (!this.formItem.itemInfoForm.committeeChangeReason) {
        this.$Notice.error({ title: '请填写变更原因说明', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.committeeChangeHandler) {
        this.$Notice.error({ title: '请填写社区变更操作人', desc: '' })
        return false
      }
      this.changeToView()
    },
    // 保存死亡证明表
    saveDeathInfo (card) {
      if (!this.formItem.itemInfoForm.processing_time) {
        this.$Notice.error({ title: '请填写办理时间', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.death_realitive) {
        this.$Notice.error({ title: '请填写与死者关系', desc: '' })
        return false
      }
      if (!this.formItem.itemInfoForm.family_members_name) {
        this.$Notice.error({ title: '请填写家属姓名', desc: '' })
        return false
      }
      var reg = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/
      if (reg.test(card) === false) {
        alert('身份证输入不合法')
        return false
      }
      this.formItem.itemDeathFormShow = false
      this.changeToView()
      return true
    },
    // 人脸识别回调函数
    imgResult (data) {
      if (data.result) {
        this.face_mol = false
        this.face_shows = false
        this.documentlist[this.formItem.paramIndex].img_url = data.result
        this.changeToView()
      } else {
        alert('拍照失败,请重新拍摄')
      }
    },
    // 高拍仪保存函数
    retFun (data) {
      if (data.result) {
        this.gpy_mol = false
        this.gpy_shows = false
        this.documentlist[this.formItem.paramIndex].img_url = data.result
        this.changeToView()
      } else {
        alert('拍照失败,请重新拍摄')
      }
    },
    // 上传图片回调函数
    uploadPicSuccess (res, file) {
      if (res.state === 'SUCCESS') {
        this.documentlist[this.formItem.paramIndex].img_url = res.url
        this.temp_photo = res.url
      } else {
        this.$Notice.error({ title: '', desc: res.msg })
      }
    },
    // 公共莫代快弹出的方法
    popApplicationAgriculturalForm (item) {
      this.commInfo()
      this.getValidateRules(this.interface_code)
      this.formItem.itemApplicationAgriculturalFormTitle = item.name
      if (this.$route.params.code) {
        this.formItem.itemInfoForm = item.formdata || {}
      } else {
        this.formItem.itemInfoForm = {}
        this.formItem.itemInfoForm.applyPerson = this.personinfo.name || ''
        this.formItem.itemInfoForm.applyIdCard = this.$route.params.cardno
        this.formItem.itemInfoForm.phone = this.personinfo.phone || ''
        this.formItem.itemInfoForm.inputCommittee = this.communityData.shequ_code
        this.formItem.itemInfoForm.familyCode = this.ruleData.familyCode
        this.tempData.personList = this.personList
        this.tempData.personList[0].bz_name = this.formItem.itemInfoForm.applyPerson
        this.tempData.personList[0].bz_idcard = this.$route.params.cardno
        this.tempData.houseList = this.houseList
      }
      this.formItem[item.form_path] = true
    },
    // 身份证号获取用户信息
    getuserinfo (cardno) {
      userinfo(cardno).then(res => {
        if (res.data.data) {
          this.personinfo = res.data.data
          this.personinfo.type = '身份证'
        } else {
          this.$Notice.error({ title: '查不到人员信息' })
        }
      })
    },
    saveOrder () {
      let paramJson = {}
      let param = {
        item_id: this.$route.params.itemid,
        cardno: this.$route.params.cardno
      }
      let verify = true
      this.documentlist.forEach(element => {
        if (element.write_type === 'images' && element.img_url) {
          paramJson[element.value] = element.img_url
        } else if (element.write_type === 'form') {
          if (element.document_id === 152 || element.document_id === 155) {
            this.formItem.itemInfoForm.apply_date = date2str(this.formItem.itemInfoForm.apply_date)
            param.form_params = this.formItem.itemInfoForm
          } else if (element.document_id === 178) {
            this.formItem.itemInfoForm.processing_time = date2str(this.formItem.itemInfoForm.processing_time)
            this.formItem.itemInfoForm.family_members_name = date2str(this.formItem.itemInfoForm.family_members_name)
            this.formItem.itemInfoForm.family_members_ID = date2str(this.formItem.itemInfoForm.family_members_ID)
            this.formItem.itemInfoForm.death_realitive = date2str(this.formItem.itemInfoForm.death_realitive)
            param.form_params = this.formItem.itemInfoForm
          } else {
            verify = this.saveJzInfo(false)
            param.form_params = this.formItem.itemInfoForm
          }
        }
      })
      if (!verify) return
      param.params = JSON.stringify(paramJson)
      if (this.$route.params.code) {
        param.code = this.$route.params.code
        updateOrder(param).then(res => {
          if (res.data.data) {
            this.$Notice.success({ title: '保存成功', desc: '业务编号：' + param.code })
            this.$router.push({ name: this.$route.params.path || 'workbench', params: this.$route.params.cur_data })
          } else {
            this.$Notice.error({ title: '保存失败' })
          }
        })
      } else {
        createOrder(param).then(res => {
          if (res.data.data) {
            this.$Notice.success({ title: '保存成功', desc: '业务编号：' + res.data.data })
            this.$router.push({ name: this.$route.params.path || 'workbench', params: this.$route.params.cur_data })
          } else {
            this.$Notice.error({ title: '保存失败', desc: res.data.errmsg })
          }
        })
      }
    },
    handlerItem (button, key) {
      if (this.formItem.operation !== '3') {
        this.$Notice.success({ title: '错误', desc: '' })
        return
      }
      this.formItem.fun_modal.key = key
      if (button.params_type && button.params_type.indexOf('_') !== 0) {
        this.formItem.fun_modal.title = this.itemData.text + '-' + button.name
        this.formItem.fun_modal.params_name = button.params_name
        this.formItem.fun_modal.params_code = button.params_code
        this.formItem.fun_modal.params_type = button.params_type
        this.formItem.fun_modal.show = true
      } else {
        this.$Modal.confirm({
          title: '确认' + button.name + '当前事项！',
          onOk: () => {
            this.acceptBtn()
          }
        })
      }
    },
    acceptBtn () {
      if (this.formItem.operation !== '3') {
        this.$Notice.error({ title: '错误', desc: '' })
        return
      }
      let aaa = {
        code: this.$route.params.code,
        key: this.$route.params.key + this.formItem.fun_modal.key,
        state: this.$route.params.oreder_state
      }
      if (this.formItem.fun_modal.params_code && this.formItem.fun_modal.params_code.indexOf('_') === 0) {
        aaa[this.formItem.fun_modal.params_code.substring(1)] = this.formItem.fun_modal.text
      }
      setorderapply(aaa).then(res => {
        if (res.data.data === '1') {
          this.$Notice.success({ title: '成功' })
          this.$router.push({
            name: this.$route.params.path || 'workbench',
            params: this.$route.params.cur_data
          })
        } else {
          this.$Notice.error({ title: '失败', desc: res.data.errmsg })
        }
      })
    },
    backOrder () {
      this.$router.push({
        name: this.$route.params.path || 'workbench',
        params: this.$route.params.cur_data
      })
    },
    changeInMonth () {
      // 变更--月份字段
      if (this.ruleData.changeMonth !== undefined) {
        this.monthList = this.ruleData.changeMonth.split(',')
        /* console.log(monthList, '月份') */
        // 终止--月份字段
      } else if (this.ruleData.stopMonth !== undefined) {
        this.monthList = this.ruleData.stopMonth.split(',')
        /* console.log(monthList, '月份') */
        // 年审--选择年份
      } else if (this.ruleData.years !== undefined) {
        this.monthList = this.ruleData.years.split(',')
      /*  console.log(monthList, '年份') */
      }
    },
    closeHeight () {
      console.log('guanbi')
      this.gpy_shows = false
    },
    getValidateRules () {
      ensureApply({ interface_code: this.interface_code, idCard: this.$route.params.cardno }).then(res => {
        if (res.data.errcode === 0) {
          console.log(res.data.data, '规则信息')
          this.ruleData = res.data.data
          this.changeInMonth()
          // this.personTypeList = res.data.data.personTypeList
          // if (res.data.data.personTypeList !== undefined) {
          //   this.formItem.itemInfoForm.personTypeArr = [res.data.data.personTypeList[0].personTypeCode]
          //   console.log(this.formItem.itemInfoForm.personTypeArr)
          // } else {
          //   console.log('这是没有personTypeList')
          // }
          /* this.changeInMonth() */
        } else {
          this.$Notice.error({ title: res.data.errmsg })
        }
      })
    }
  },
  mounted () {
    // console.log(this.$route.params, '111aaaaaaaa')
    // this.$route.params.cardno = '21010319600420335X'
    // this.interface_code = this.$route.params.interface_code
    console.log(this.interface_code, 'this.interface_code')
    // this.$route.params.itemid = '11210101000000FCJD5212000250000'
    this.$route.params.operation = '1'
    let param = {
      'cardno': this.$route.params.cardno,
      'id': this.$route.params.itemid,
      'code': this.$route.params.code,
      'params': '1'
    }
    this.getuserinfo(param.cardno)
    iteminf(param).then(res => {
      if (res.data.data) {
        this.itemData = res.data.data
        this.documentlist = res.data.data.documentlist
        this.documentlist.forEach(element => {
          element.type_name = this.formItem.dict['t_' + element.type] || '未知'
          element.write_type_name = this.formItem.dict['wt_' + element.write_type] || '未知'
          if (element.img_url || element.formdata) {
            element.is_submit = '已提交'
          } else {
            element.is_submit = '未提交'
          }
        })
      }
    })
    this.formItem.operation = this.$route.params.operation
    this.formItem.buttons_list = this.$route.params.buttons || {}
  }
}
</script>
